package bb.lanxing.model.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.alibaba.fastjson.annotation.JSONField;

import bb.lanxing.model.json.ServerUser;


public class PlaceComment implements Parcelable {
    public static final Creator<PlaceComment> CREATOR = new Creator<>() {
        @Override
        public PlaceComment createFromParcel(Parcel parcel) {
            return new PlaceComment(parcel);
        }

        @Override
        public PlaceComment[] newArray(int i) {
            return new PlaceComment[i];
        }
    };
    @JSONField(name = "content")
    private String content;
    @JSONField(name = "id")
    private int id;
    @JSONField(name = "comment_pics")
    private String imageUrl;
    @JSONField(name = "informed_user_id")
    private long informedUserId;
    @JSONField(name = "informed_user_name")
    private String informedUserName;
    @JSONField(serialize = false)
    private boolean isPicComment;
    @JSONField(name = "user_detail")
    private ServerUser serverUser;
    @JSONField(name = "create_time")
    private long time;

    @Override 
    public int describeContents() {
        return 0;
    }

    protected PlaceComment(Parcel parcel) {
        this.informedUserId = 0L;
        this.informedUserName = "";
        this.imageUrl = parcel.readString();
        this.content = parcel.readString();
        this.time = parcel.readLong();
        this.id = parcel.readInt();
        this.isPicComment = parcel.readByte() != 0;
        this.serverUser = (ServerUser) parcel.readParcelable(ServerUser.class.getClassLoader());
        this.informedUserId = parcel.readLong();
        this.informedUserName = parcel.readString();
    }

    public boolean isPicComment() {
        return this.isPicComment;
    }

    public void setPicComment(boolean z) {
        this.isPicComment = z;
    }

    public ServerUser getServerUser() {
        return this.serverUser;
    }

    public void setServerUser(ServerUser serverUser) {
        this.serverUser = serverUser;
    }

    public void setImageUrl(String str) {
        this.imageUrl = str;
    }

    public void setContent(String str) {
        this.content = str;
    }

    public void setTime(long j) {
        this.time = j;
    }

    public void setId(int i) {
        this.id = i;
    }

    public long getInformedUserId() {
        return this.informedUserId;
    }

    public String getInformedUserName() {
        return this.informedUserName;
    }

    public void setInformedUserId(long j) {
        this.informedUserId = j;
    }

    public void setInformedUserName(String str) {
        this.informedUserName = str;
    }

    public String getImageUrl() {
        return this.imageUrl;
    }

    public String getContent() {
        return this.content;
    }

    public long getTime() {
        return this.time;
    }

    public int getId() {
        return this.id;
    }

    public PlaceComment() {
        this.informedUserId = 0L;
        this.informedUserName = "";
    }

    @Override 
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(this.imageUrl);
        parcel.writeString(this.content);
        parcel.writeLong(this.time);
        parcel.writeInt(this.id);
        parcel.writeByte(this.isPicComment ? (byte) 1 : (byte) 0);
        parcel.writeParcelable(this.serverUser, i);
        parcel.writeLong(this.informedUserId);
        parcel.writeString(this.informedUserName);
    }
}
